1. Field of the Invention
The present invention generally relates data processing systems, and more particularly relates to rules-based expert systems.
2. Description of the Prior Art
With the rapid advancement of modern electronics, data processing systems have found many new and useful applications. Today, almost every industry sector uses some form of data processing systems in it's daily activities. The banking industry, for example, uses mainframe type data processing systems to maintain large accounting databases, and to manage the large number of banking transactions that occur every day. The manufacturing industry uses data processing systems to maintain process flows, and manage inventory. Engineering and scientific applications are self evident. Even in the home, personal computers have become widely used.
Numerous software programs exist to support each of these varying applications. Traditionally, most software is written using a conventional high level computer programming language such as FORTRAN, PASCAL, COBOL, C++, Visual Basic, etc. A common statement in all of these programming languages is some form of a conditional statement. One example of a conditional statement is an if-then type statement, and typically includes an if type clause and a corresponding then type clause. The if type clause usually has a corresponding expression, which if true, allows the execution of the then type clause. When using conventional programming languages, all statements including the conditional statements must be explicitly specified in the context of the overall program flow.
Recently, rules-based expert systems have gained popularity, and are particularly suited for certain applications. In a rules-based expert system, a number of rules are provided. The rules may be grouped into a number of rule sets, wherein each of the rule sets can be individually submitted for processing. Each rule set may having a listing of rules that identifies the rules that are associated with the rule set.
Each rule is similar to a conditional statement in a conventional programming language. Unlike conventional programming languages, however, a rules-based expert system typically has a special program called an inference engine. The inference engine manages the rules and applies them as appropriate, rather than simply executing the rules in a strictly sequential manner as in the conventional computer programming languages.
Typically, the inference engine applies the rules in an iterative manner. During a first pass, the inference engine typically sequentially processes a number of selected rules. For each rule, the inference engine determines if the expression of the if type clause is true. This is known as applying the rules. If the expression is found to be true, the corresponding then type clause is executed. This is known as executing the rule. Often, the "then" type clause executes statements that change a variable or parameter within the system. The inference engine maintains a listing of the updated parameters.
During a second pass, the inference engine determines which of the rules have an expression in the if type clause that is dependent on one or more of the parameters in the listing of updated parameters. The inference engine reapplies only those rules, and again updates the listing of updated parameters. This is repeated until no parameters exist in the listing of updated parameters.
As can readily be seen, the precise flow of rule processing in a rules-based expert system can vary dramatically, depending on the particular interactions between the rules that are processed. The interactions between rules can be very difficult to predict, particularly since hundreds of rules may exist within the system. This often makes robust debug and product testing of rules-based expert system difficult, time consuming, and tedious. It would be advantageous, therefore, to provide a system and method for efficiently debugging and/or testing a rules based expert system.